home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 1
/
Gold Medal Software Volume 1 (Gold Medal) (1994).iso
/
prog
/
dasv10_.arj
/
DIEHERO.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-08-13
|
341 b
|
19 lines
// dice.lib function die_hero()
#include <dos.h>
#include <iostream.h>
#include <stdlib.h>
int die_hero(int size,int time,int display)
{
int diehero,i;
for (i=1;i<=10;i++) {
diehero = 1 + rand() % size;
if (display == 0)
cout<<"?\b";
else if (display == 1)
cout<<diehero<<"\b";
delay(time);
}
return diehero;
}